The objective is to increase student understanding of the following programming:
Smell List (To search for agents)
Variables (to add and subtract values to)
Set Status (to display information on the command bar)
Agent Numbers (Individual for all agents of the same breed to tell them apart)
Seeker Missile Programming
Create a breed to be your Seeker Missile. ( I have done this for you but you can change the breed if you wish)
Create an Agent Number for each Alien in the Alien window. This will allow each Alien to have a personal identity number.
Create a Shared Number for the Seeker Missiles Available. This variable will have numbers subtracted or added to it. This value can be used in various ways. In this case, we are limiting the number of Seeker Missiles to 1 and when fired the Seeker Missiles Available value will be increased by -1.
Create a Procedure for Seeker Missile Hunting. This will use the Smell With to search around 50 spaces for any Aliens over a population number of 0. The Seeker Missile will then set a heading toward the nearest Alien on the Smell List. (The movement of the Seeker Missile Forward is found in the Alien Attack Forever Block that you will put in later.)
You will have to add Controls to the Fighter for the Seeker Missile. If the Seeker Missiles Available is over 0, hatch [Do] a new fighter and turn the Fighter into a Seeker Missile with the characteristics below. After firing, the Seeker Missiles Available will be increased by -1. (You will not have any more Seeker Missiles to use due to the Seeker Missiles Available shared number is now set to 0.)
In the Fighter vs. Alien Setup, place the set Seeker Missiles Available number to a value of 1 (use only one Seeker Missile).
In the Alien Attack Forever block: set the Forward motion of Seeker Missile; add a call block to the Seeker Missile Hunting procedure found in the Seeker Missile window; and Set Status using text blocks to show the number of Seeker Missiles Available on the command bar.
Add the Collision for Seeker Missile and Alien. Provide the call block to the Fighter Explosion procedure to show some special effects.
The objective is to increase student understanding of the following programming:
Seeker Missile Programming